<template>
  <div class="container">
    <app-header :needBack="true" :title="''" ref="appHeader"></app-header>
    <iframe :src="url" v-if="url" class="iframe" ref="iframe" :style="{'height': height}"></iframe>
  </div>
</template>
<script>
import AppHeader from '@/components/common/AppHeader'
export default {
  computed: {
    url () {
      return this.$route.query.url || ''
    }
  },
  data () {
    return {
      height: 0
    }
  },
  components: {
    AppHeader
  },
  mounted () {
    const winHeight = document.documentElement.clientHeight
    const headerHeight = this.$refs.appHeader.$el.offsetHeight
    this.height = winHeight - headerHeight + 'px'
  }
}
</script>
<style lang="less" scoped>
  .iframe {
    width: 100%;
    height: 90vh;
  }
</style>
